﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
namespace Bussiness.Content
{
    public class ContentCategoryBLL
    {
        private DataAccess.Content.ContentCategoryDAL dal;
        //public DataTable getLangcatbyID(int CatID,int LangID)
        public ContentCategoryBLL()
        {
            dal = new DataAccess.Content.ContentCategoryDAL();
        }
        public FOModels.Content.LangContentCategory getLangcatbyID(int CatID, int LangID)
        {
            FOModels.Content.LangContentCategory cat = null;
            DataTable tb = dal.getLangcatbyID(CatID, LangID);
            if (tb != null && tb.Rows.Count > 0)
            {
                cat = new FOModels.Content.LangContentCategory();
                cat.ContentCID =int.Parse( tb.Rows[0]["ContentCID"].ToString());
                cat.LangID = int.Parse(tb.Rows[0]["LangID"].ToString());
                cat.Name = tb.Rows[0]["Name"].ToString();
            }
            return cat;
        }
    }
}
